Din : mov dx, 2Eh ;Select Index Register mov al, 87h out dx, al ;Write twice mov al, 87h out dx, al mov ax, 0607h ;Logic Device 6 mov dx, 2Eh ;Select Index Register out dx, al inc dx ;DX = data port address xchg al, ah out dx, al mov al, 0A2h mov dx, 2Eh ;Select Index Register out dx, al inc dx ;DX = data port address in al, dx and al, 00Fh mov bl, al mov dx, 2Eh ;Select Index Register mov al, 0AAh out dx, al ;Escape configuration mode Dout : mov dx, 2Eh ;Select Index Register mov al, 87h out dx, al ;Write twice mov al, 087h out dx, al mov ax, 0607h ;Logic Device 6 mov dx, 2Eh ;Select Index Register out dx, al inc dx ;DX = data port address xchg al, ah out dx, al mov al, 0A1h ;GPIO5 output register and bl, 0fh ; shl bl, 4 mov ah, bl mov dx, 2Eh ;Select Index Register out dx, al inc dx ;DX = data port address xchg al, ah out dx, al mov dx, 2Eh ;Select Index Register mov al, 0AAh out dx, al ;Escape configuration mode